package com.slz3.business.module.wmsManagement.wmsPurchaseOrderThree.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.wmsManagement.wmsPurchaseOrderThree.domain.WmsPurchaseOrderThree;
import com.slz3.business.module.wmsManagement.wmsPurchaseOrderThree.domain.WmsPurchaseOrderThreeCondition;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class WmsPurchaseOrderThreeResController extends WmsPurchaseOrderThreeResAtomic {

    public Mono<ServerResponse> add(ServerRequest req, WmsPurchaseOrderThree wmsPurchaseOrderThree) {
        if (WmsPurchaseOrderThreeResUnsafeValid.add(req, wmsPurchaseOrderThree)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.add_$WmsPurchaseOrderThreeUpdateLock(req, wmsPurchaseOrderThree);
        }
    }

    public Mono<ServerResponse> delete(ServerRequest req, WmsPurchaseOrderThreeCondition wmsPurchaseOrderThreeCondition) {
        if (WmsPurchaseOrderThreeResUnsafeValid.delete(req, wmsPurchaseOrderThreeCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.delete_$WmsPurchaseOrderThreeUpdateLock(req, wmsPurchaseOrderThreeCondition);
        }
    }

    public Mono<ServerResponse> modify(ServerRequest req, WmsPurchaseOrderThree wmsPurchaseOrderThree) {
        if (WmsPurchaseOrderThreeResUnsafeValid.modify(req, wmsPurchaseOrderThree)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.modify_$WmsPurchaseOrderThreeUpdateLock(req, wmsPurchaseOrderThree);
        }
    }

    public Mono<ServerResponse> list(ServerRequest req) {
        if (WmsPurchaseOrderThreeResUnsafeValid.list(req)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.list(req);
        }
    }

    public Mono<ServerResponse> info(ServerRequest req) {
//        return wmsPurchaseOrderThreeResAtomic.info_$WmsPurchaseOrderThreeUpdateLock(req);
        if (WmsPurchaseOrderThreeResUnsafeValid.info(req)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.info_$WmsPurchaseOrderThreeUpdateLock(req);
        }
    }

    public Mono<ServerResponse> choice(ServerRequest req) {
        if (WmsPurchaseOrderThreeResUnsafeValid.choice(req)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.choice(req);
        }
    }

    public Mono<ServerResponse> auditSubmit(ServerRequest req, WmsPurchaseOrderThreeCondition wmsPurchaseOrderThreeCondition) {
        //
        if (WmsPurchaseOrderThreeResUnsafeValid.auditSubmit(req, wmsPurchaseOrderThreeCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.auditSubmit_$WmsPurchaseOrderThreeUpdateLock(req, wmsPurchaseOrderThreeCondition);
        }
    }

    public Mono<ServerResponse> audit(ServerRequest req, WmsPurchaseOrderThreeCondition wmsPurchaseOrderThreeCondition) {
        if (WmsPurchaseOrderThreeResUnsafeValid.audit(req, wmsPurchaseOrderThreeCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.audit_$WmsPurchaseOrderThreeUpdateLock(req, wmsPurchaseOrderThreeCondition);
        }
    }

    public Mono<ServerResponse> auditReject(ServerRequest req, WmsPurchaseOrderThreeCondition wmsPurchaseOrderThreeCondition) {
        if (WmsPurchaseOrderThreeResUnsafeValid.auditReject(req, wmsPurchaseOrderThreeCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.auditReject_$WmsPurchaseOrderThreeUpdateLock(req, wmsPurchaseOrderThreeCondition);
        }
    }

    public Mono<ServerResponse> usingEnable(ServerRequest req, WmsPurchaseOrderThreeCondition wmsPurchaseOrderThreeCondition) {
        if (WmsPurchaseOrderThreeResUnsafeValid.usingEnable(req, wmsPurchaseOrderThreeCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.usingEnable_$WmsPurchaseOrderThreeUpdateLock(req, wmsPurchaseOrderThreeCondition);
        }
    }

    public Mono<ServerResponse> usingDisable(ServerRequest req, WmsPurchaseOrderThreeCondition wmsPurchaseOrderThreeCondition) {
        if (WmsPurchaseOrderThreeResUnsafeValid.usingDisable(req, wmsPurchaseOrderThreeCondition)) {
            return RR.error(req, ResInfo.builder().theme(RR.UN_SAFE_VALID).description(RR.ILLEGAL_PARAM).build());
        } else {
            return super.usingDisable_$WmsPurchaseOrderThreeUpdateLock(req, wmsPurchaseOrderThreeCondition);
        }
    }

}
